home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / vmcmd / RCS / vmcmd.man,v < prev   
Encoding:
Text File  |  1991-03-10  |  11.3 KB  |  352 lines

  1. head     1.4;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.4
  10. date     91.03.10.13.43.28;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.3;
  13.  
  14. 1.3
  15. date     91.03.10.11.18.36;  author shirriff;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     88.12.30.10.28.03;  author ouster;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     88.12.22.13.22.27;  author ouster;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @@
  32.  
  33.  
  34. 1.4
  35. log
  36. @Add -fsreset command.
  37. @
  38. text
  39. @' $Header: /sprite/src/cmds/vmcmd/RCS/vmcmd.man,v 1.3 91/03/10 11:18:36 shirriff Exp Locker: kupfer $ SPRITE (Berkeley)
  40. .so \*(]ltmac.sprite
  41. .HS VMCMD cmds
  42. .BS
  43. .SH NAME
  44. vmcmd \- set virtual memory parameters.
  45. .SH SYNOPSIS
  46. \fBvmcmd \fR[\fIoptions\fR]
  47. .SH OPTIONS
  48. .IP "\fB\-a \fIflagValue\fR" 20
  49. If \fIflagValue\fR is non-zero then the virtual memory system is forced to
  50. always refuse any file system requests for memory.
  51. .IP "\fB\-A \fIflagValue\fR" 20
  52. If \fIflagValue\fR is non-zero then the virtual memory system is forced
  53. to always satisfy any file system request for
  54. memory as long as it is possible.
  55. .IP "\fB\-c \fIpagesToCheck\fR" 20
  56. The number of pages to check during each interation
  57. of the clock algorithm is set to \fIpagesToCheck\fR .
  58. .IP "\fB\-C \fIflagValue\fR" 20
  59. If \fIflagValue\fR is non-zero then copy-on-write is enabled.
  60. .IP "\fB\-f \fIflagValue\fR" 20
  61. If \fIflagValue\fR is non-zero then pages are freed as soon as they are 
  62. cleaned.
  63. .IP "\fB\-F \fIpenalty\fR" 20
  64. If \fIpenalty\fR is less than zero then the file system is forced to pay
  65. a penalty of -\fIpenalty\fR seconds when asking for a page.  If it is
  66. greater than or equal to zero then the penalty is used in
  67. conjunction with the \fB\-n\fR option.
  68. .IP "\fB\-fsreset\fR" 20
  69. Reset the recorded minimum and maximum size of the file system cache
  70. to the current size.
  71. .IP "\fB\-x \fIsegNum\fR" 20
  72. Segment \fIsegNum\fR is flushed from memory; the \fB\-h\fR and 
  73. \fB\-l\fR options can be used to set upper and lower bounds respectively
  74. on the pages that are flushed.
  75. .IP "\fB\-h \fIpageNum\fR" 20
  76. The highest page that can be flushed is \fIpageNum\fR when using
  77. \fB\-x\fR option.
  78. .IP "\fB\-l \fIflagValue\fR" 20
  79. The lowest page that can be flushed is \fIpageNum\fR when using
  80. \fB\-x\fR option.
  81. .IP "\fB\-n \fInumGroups\fR" 20
  82. The number of groups to divide memory into when assessing a penalty is set to
  83. \fInumGroups\fR.
  84. .IP "\fB\-p \fIpageOutProcs\fR" 20
  85. The number of processes used to write back pages is set to \fIpageOutProcs\fR.
  86. .IP "\fB\-P \fIflagValue\fR" 20
  87. If \fIflagValue\fR is non-zero then pre-fetching is turned on.
  88. .IP "\fB\-r \fIflagValue\fR" 20
  89. If \fIflagValue\fR is non-zero then pages that are copied because of
  90. copy-on-reference faults are made read-only until they get modified.
  91. .IP "\fB\-R \fIflagValue\fR" 20
  92. If \fIflagValue\fR is non-zero then the virtual memory system will try
  93. to take advantage of the file system's read ahead policy.
  94. .IP "\fB\-s \fInumSeconds\fR" 20
  95. The number of seconds between iterations of the clock algorithm is set to
  96. be \fInumSeconds\fR.
  97. .IP "\fB\-t \fItracesPerSec\fR" 20
  98. Virtual memory tracing is turned on at the rate of \fItracesPerSec\fR
  99. traces per second.
  100. .IP "\fB\-T\fR" 20
  101. Virtual memory tracing is turned off.
  102. .IP "\fB\-e n [ -X n2 ]\fR" 20
  103. Hook for extra commands.  This executes \fIVm_Cmd(n,n2)\fP, with \fIn2\fP
  104. defaulting to 0.
  105. .BE
  106.  
  107. .SH INTRODUCTION
  108. .LP
  109. This command sets various parameters of the virtual memory system.  It
  110. is implemented using the Vm_Cmd system call.  It controls behavior of
  111. the virtual memory system in 7 areas: virtual memory and file system
  112. negotiation, virtual memory tracing, the speed of the clock algorithm,
  113. flushing of segments, prefetch, copy-on-write and other miscellaneous
  114. things.
  115. .SH "VM-FS NEGOTIATION"
  116. .LP
  117. There are four options to \fBvmcmd\fR that can be used to control the
  118. negotiation between the virtual memory system and the file system.
  119. The most interesting are the options which allow the file  system
  120. to be penalized relative to the virtual memory system.
  121. The \fB\-F\fR and \fB\-n\fR options are
  122. used to control the penalty.  The simplest way to penalize the file system
  123. is to supply the \fB\-F \fIpenalty\fR option with a negative number.  
  124. In this case the file system is penalized by the absolute value of 
  125. \fIpenalty\fP each time that it asks for memory.  The penalty is assessed 
  126. by adding \fIpenalty\fP seconds to the access time of each VM page so that
  127. the VM pages seem to have been used more recently than they really have.
  128. .LP
  129. The \fB\-n \fInumGroups\fR option gives a more complex method of penalizing the
  130. file system.  With this option the number of available pages are divided
  131. up into \fInumGroups\fR groups.  When the file system asks for memory
  132. the penalty depends on how many pages that it already has.  Its
  133. penalty is assessed as
  134. .sp
  135. .in +0.5i
  136. (\fIcurrent-number-of-pages\fR / \fInumGroups\fR) * \fIpenalty\fP
  137. .in -0.5i
  138. .sp
  139. seconds.
  140. .LP
  141. There are two other ways to effect the VM-FS negotiation.  The \fB\-a\fR
  142. option can be used to force the virtual memory system to always refuse to
  143. give memory to the file system.  The \fB\-A\fR can be used to force the
  144. virtual memory sysytem to always satisfy the file system's requests for
  145. memory as long as they are feasible.  These options are designed to be used
  146. to determine the effect of different polices on VM and FS negotiation.
  147. .SH "TRACING"
  148. .LP
  149. The virtual memory system has the ability to trace segment creation
  150. and destruction, reference and modify bit use, page faults
  151. and copy-on-write behavior.  Tracing is turned on with \fB\-t \fItracePerSec\fR
  152. option.  Once tracing is turned on everything but the reference
  153. and modify bit traces will be traced as it occurs.  However,
  154. the reference and modify bits are traced by scanning the hardware page maps
  155. \fItracePerSec\fR times per second.  The output of the trace is stored in
  156. the file ``/sprite/vmtrace/tfile.\fIhost-id\fR'' where \fIhost-id\fR is the
  157. sprite id for the host.  Tracing is terminated with the \fB\-T\fR option.
  158. .SH CLOCK
  159. .LP
  160. The virtual memory system keeps all pages in approximate least-recently-used
  161. (LRU) order by using a version of the clock algorithm.  The clock algorithm
  162. is implemented by scanning a given number of pages in memory every few
  163. seconds.  The number of pages that are scanned can be set with the
  164. \fB\-c \fIpagesToCheck\fR option and how often the pages are scanned
  165. can be set with the \fB\-s \fInumSeconds\fR option.  The result is that
  166. \fIpagesToCheck\fR pages are checked every \fInumSeconds\fR.
  167. .SH FLUSHING
  168. .LP
  169. In order to allow measurement of the performance of
  170. the virtual memory system, \fBvmcmd\fR allows segments to be flushed from memory.
  171. When a segment is flushed dirty pages are written to swap
  172. space and the pages in the segment are removed from memory.  The
  173. \fB\-x \fIsegNum\fR option is used to specify which segment to flush and
  174. the \fB\-l \fIlowPageNum\fR and \fB\-h \fIhighPageNum\fR options are used to
  175. specify the range of pages to flush.  By default the lowest page to flush
  176. is the lowest page in the segment and the highest is the highest page in
  177. the segment.  However, the \fB\-l\fR or \fB\-h\fR
  178. options can be used to set the lowest page to \fIlowPageNum\fR and the
  179. highest to \fIhighPageNum\fP respectively.
  180. .SH PREFETCH
  181. .LP
  182. Both the virtual memory system and the file system implement prefetch.
  183. Virtual memory prefetch can be turned on or off by using the
  184. \fB\-P \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
  185. prefetching is enabled and if it is zero prefetching is disabled.  Likewise
  186. whether or not the virtual memory system takes advantage of the file
  187. system's prefetech can be determined with the \fB\-R \fIflagValue\fR option;
  188. non-zero means use FS prefetch, 0 means don't use it.
  189. .SH COPY-ON-WRITE
  190. .LP
  191. Copy-on-write can be turned on or off by using the \fB\-C \fIflagValue\fR
  192. option.  If \fIflagValue\fR is non-zero then
  193. copy-on-write is enabled and if it zero copy-on-write is disabled.
  194. .SH MISCELLANEOUS
  195. .LP
  196. There are two other parameters of the virtual memory system that
  197. can be set with \fBvmcmd\fR.  The number of processes that are used to
  198. write out dirty pages can be set with the \fB\-p \fIpageOutProcs\fR option.
  199. Whether or not memory is freed once it gets to the front of the allocate
  200. list or it is left alone until it has to be recycled is controlled with the
  201. \fB\-f \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
  202. pages are freed once they are cleaned and if it is zero 
  203. pages remain on the front of the allocate list after they are cleaned.
  204. .SH KEYWORDS
  205. virtual memory
  206. @
  207.  
  208.  
  209. 1.3
  210. log
  211. @Added -e,-X flags.
  212. @
  213. text
  214. @d1 1
  215. a1 1
  216. ' $Header: /sprite/src/cmds/vmcmd/RCS/vmcmd.man,v 1.2 88/12/30 10:28:03 ouster Exp Locker: shirriff $ SPRITE (Berkeley)
  217. d30 3
  218. @
  219.  
  220.  
  221. 1.2
  222. log
  223. @More format upgrades.
  224. @
  225. text
  226. @d1 1
  227. a1 1
  228. ' $Header: /a/newcmds/vmcmd/RCS/vmcmd.man,v 1.1 88/12/22 13:22:27 ouster Exp Locker: ouster $ SPRITE (Berkeley)
  229. d61 3
  230. @
  231.  
  232.  
  233. 1.1
  234. log
  235. @Initial revision
  236. @
  237. text
  238. @d1 1
  239. a1 1
  240. ' $Header: vmcmd,v 1.1 88/08/16 09:55:15 nelson Exp $ SPRITE (Berkeley)
  241. d10 1
  242. a10 1
  243. .IP "\fB-a \fIflagValue\fR" 20
  244. d13 1
  245. a13 1
  246. .IP "\fB-A \fIflagValue\fR" 20
  247. d17 1
  248. a17 1
  249. .IP "\fB-c \fIpagesToCheck\fR" 20
  250. d20 1
  251. a20 1
  252. .IP "\fB-C \fIflagValue\fR" 20
  253. d22 1
  254. a22 1
  255. .IP "\fB-f \fIflagValue\fR" 20
  256. d25 1
  257. a25 1
  258. .IP "\fB-F \fIpenalty\fR" 20
  259. d29 4
  260. a32 4
  261. conjunction with the \fB-n\fR option.
  262. .IP "\fB-x \fIsegNum\fR" 20
  263. Segment \fIsegNum\fR is flushed from memory; the \fB-h\fR and 
  264. \fB-l\fR options can be used to set upper and lower bounds respectively
  265. d34 1
  266. a34 1
  267. .IP "\fB-h \fIpageNum\fR" 20
  268. d36 2
  269. a37 2
  270. \fB-x\fR option.
  271. .IP "\fB-l \fIflagValue\fR" 20
  272. d39 2
  273. a40 2
  274. \fB-x\fR option.
  275. .IP "\fB-n \fInumGroups\fR" 20
  276. d43 1
  277. a43 1
  278. .IP "\fB-p \fIpageOutProcs\fR" 20
  279. d45 1
  280. a45 1
  281. .IP "\fB-P \fIflagValue\fR" 20
  282. d47 1
  283. a47 1
  284. .IP "\fB-r \fIflagValue\fR" 20
  285. d50 1
  286. a50 1
  287. .IP "\fB-R \fIflagValue\fR" 20
  288. d53 1
  289. a53 1
  290. .IP "\fB-s \fInumSeconds\fR" 20
  291. d56 1
  292. a56 1
  293. .IP "\fB-t \fItracesPerSec\fR" 20
  294. d59 1
  295. a59 1
  296. .IP "\fB-T\fR" 20
  297. d73 1
  298. a73 1
  299. There are four options to vmcmd that can be used to control the
  300. d77 1
  301. a77 1
  302. The \fB-F\fR and \fB-n\fR options are
  303. d79 1
  304. a79 1
  305. is to supply the \fB-F \fIpenalty\fR option with a negative number.  
  306. d85 1
  307. a85 1
  308. The \fB-n \fInumGroups\fR option gives a more complex method of penalizing the
  309. d97 1
  310. a97 1
  311. There are two other ways to effect the VM-FS negotiation.  The \fB-a\fR
  312. d99 1
  313. a99 1
  314. give memory to the file system.  The \fB-A\fR can be used to force the
  315. d107 1
  316. a107 1
  317. and copy-on-write behavior.  Tracing is turned on with \fB-t \fItracePerSec\fR
  318. d113 1
  319. a113 1
  320. sprite id for the host.  Tracing is terminated with the \fB-T\fR option.
  321. d120 2
  322. a121 2
  323. \fB-c \fIpagesToCheck\fR option and how often the pages are scanned
  324. can be set with the \fB-s \fInumSeconds\fR option.  The result is that
  325. d126 1
  326. a126 1
  327. the virtual memory system, vmcmd allows segments to be flushed from memory.
  328. d129 2
  329. a130 2
  330. \fB-x \fIsegNum\fR option is used to specify which segment to flush and
  331. the \fB-l \fIlowPageNum\fR and \fB-h \fIhighPageNum\fR options are used to
  332. d133 1
  333. a133 1
  334. the segment.  However, the \fB-l\fR or \fB-h\fR
  335. d140 1
  336. a140 1
  337. \fB-P \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
  338. d143 1
  339. a143 1
  340. system's prefetech can be determined with the \fB-R \fIflagValue\fR option;
  341. d147 1
  342. a147 1
  343. Copy-on-write can be turned on or off by using the \fB-C \fIflagValue\fR
  344. d153 2
  345. a154 2
  346. can be set with vmcmd.  The number of processes that are used to
  347. write out dirty pages can be set with the \fB-p \fIpageOutProcs\fR option.
  348. d157 1
  349. a157 1
  350. \fB-f \fIflagValue\fR option; if \fIflagValue\fR is non-zero then
  351. @
  352.